/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.admin.entity.ElevatorStopLog;
import org.springblade.modules.admin.vo.ElevatorRelationDetailVO;
import org.springblade.modules.admin.vo.ElevatorStopLogListVO;
import org.springblade.modules.admin.vo.ElevatorStopLogVO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 电梯停梯状态日志 服务类
 *
 * @author ysq
 * @since 2022-10-09
 */
public interface IElevatorStopLogService extends BaseService<ElevatorStopLog> {

	/**
	 * 停梯状态对应字典code
	 */
	String STOP_ELEVATOR_STATUS_DICT_KEY = "stop_elevator_status";

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param elevatorStopLog
	 * @return
	 */
	IPage<ElevatorStopLogVO> selectElevatorStopLogPage(IPage<ElevatorStopLogVO> page, ElevatorStopLogVO elevatorStopLog);

	/**
	 * 插入电梯停梯状态日志
	 * @param elevatorStopLog
	 * @return
	 */
    boolean insertStopLog(ElevatorStopLog elevatorStopLog);

	/**
	 * 根据id 查询单台电梯日志
	 * @param page 分页参数
	 * @param elevatorId 电梯Id
	 * @param beginTime 开始时间
	 * @param endTime 结束时间
	 * @return 分页查询结果
	 */
	IPage<ElevatorStopLogVO> selectStopLogPageById(IPage<ElevatorStopLogVO> page, Long elevatorId, String beginTime, String endTime, List<Long> userIds, Integer source, Integer module);


    IPage<ElevatorStopLogListVO> selectElevatorPage(ElevatorStopLogListVO vo, IPage<ElevatorStopLogListVO> page);

	ElevatorStopLog getLatestLog(Long elevatorId);

    void downExcel(ElevatorStopLogListVO vo, HttpServletResponse response) throws IOException;

}
